package containers;
//This class acts as a key for appointments.
//It is used for appointments in a java hash map.

public class AppKey
	{
	int personID,appointmentID;
	public AppKey(int p,int a)
		{
		personID=p;
		appointmentID=a;
		}
	public boolean equals(Object o)
		{
		if (o instanceof AppKey)
			return (((AppKey) o).personID==personID && ((AppKey) o).appointmentID==appointmentID);
		else
			return false;
		}
	public int hashCode()
		{
		return personID*512+appointmentID;
		}
	public int getOwnerID()
		{
		return personID;
		}
	public int getAppointmentID()
		{
		return appointmentID;
		}
	}
